import { PageContainer } from '@/component/page-container';
import { Breadcrumb, Space, Radio, Card } from 'antd';
import React, { useState } from 'react';
import BorrowinView from '@/view/teacher/employed/borrowin-approve';
import BorrowoutView from '@/view/teacher/employed/borrowout';

const Group = () => {
  const [position, setPosition] = useState<'start' | 'end'>('start');
  return (
    <PageContainer header={<Breadcrumb items={[{ title: '借动管理' }]} />}>
      <Card>
        <Space>
          <Radio.Group value={position} onChange={e => setPosition(e.target.value)}>
            <Radio.Button value="start" type="text">
              借入
            </Radio.Button>
            <Radio.Button value="end" type="text">
              借出
            </Radio.Button>
          </Radio.Group>
        </Space>
        <div style={{ marginTop: 20 }}>{position === 'start' ? <BorrowinView /> : <BorrowoutView />}</div>
      </Card>
    </PageContainer>
  );
};

export default Group;
